<?php 



class person{
public $name;
public function __construct()
{
    echo "我是构造函数";
}
public function show(){
    echo "我是父类";
}

}
//子类
class student extends person{
    public function __construct()
    {
        person::__construct();

    }
//子类中调用父类成员
public  function test(){
    $this->show();
}
}
$stu = new student();
// var_dump($stu);
// $stu->show();
// $stu->test();
?>